package com.javadevmap.bean;
//本 class用于bean注入的实践
public class Product2 {
    private int id;
    private String name;
    public Product2(){
        System.out.println("成功进入无参数构造函数");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        System.out.println("setId");
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("setName");
        this.name = name;
    }

    public  Product2(int id, String name){
        System.out.println("成功进入有参数构造函数");
        this.id=id;
        this.name = name;
    }
}
